package com.zero.mxshengadmin;

import com.avos.avoscloud.AVOSCloud;
import com.zero.mxshengadmin.datasources.DynamicDataSourceConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Import;

@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})
@Import({DynamicDataSourceConfig.class})
public class MxshengadminApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		// 初始化AVOSCloud 参数依次为 AppId、AppKey、MasterKey
		AVOSCloud.initialize("eFvAeYCFVBdVM8oB6dsBp0Dn-gzGzoHsz","nrnKdnRXBTBsCUzkEuN5PnGr","6aUHSX9gwrp0S0QiKIvQmkmB");
		AVOSCloud.setDebugLogEnabled(true);
		SpringApplication.run(MxshengadminApplication.class, args);	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(MxshengadminApplication.class);
	}

}
